//
//  ViewController.swift
//  BitTest
//
//  Created by KuaiKuai on 2023/7/21.
//
// 工程组件化 文档  https://blog.51cto.com/u_16099218/6557953
import UIKit
import KnobControl
class ViewController: UIViewController {

    @IBOutlet weak var iconView: UIView!
    
    @IBOutlet weak var firstView: UIView!
    
    @IBOutlet weak var stackIView: UIStackView!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        let center = CenterManager.init()
        let vc = center.checkVCClass(vcClass: ChildTwoVC.self)
        if (vc is ChildVC)  {
            print("类型是ChildVC")
        }
        if (vc is ChildTwoVC)  {
            print("类型是ChildTwoVC")
        }
        //chainTypeCode()
    }
    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        //stackIView.insertArrangedSubview(firstView, at: 0)
    }
    
    //链式编程
    func chainTypeCode() {
        DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
            let vc = ChildVC().changeBackground().addRedSubView()
            self.present(vc, animated: true)
        }
    }
}


struct makeObject {
    
    var a: Int = 1

}
